import request from '../utils/request';
import host from './host';
import {getAuthToken} from '../utils/authority';

export async function query() {
  return request('/api/users');
}

export async function queryCurrent() {
  return request(`${host.host}/bearadmin/user/current?authToken=${getAuthToken()}`);
}

export async function login(params){
    return request(`${host.host}/bearadmin/login`, {
        method: 'POST',
        body: params,
    });
}
